<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>后台管理系统登录</title>		
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- basic styles -->
		<link href="{{__ROOT__}}/admin/css/bootstrap.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="{{__ROOT__}}/admin/css/font-awesome.min.css" />
		<!-- fonts -->
		<link rel="stylesheet" href="{{__ROOT__}}/admin/css/ace.min.css" />
		<link rel="stylesheet" href="{{__ROOT__}}/admin/css/ace-rtl.min.css" />
		<link rel="stylesheet" href="{{__ROOT__}}/admin/css/login.css" />
		<script src="{{__ROOT__}}/admin/js/jquery-2.0.3.min.js"></script>

		
	</head>
	<body class="login-layout">
		<div class="main-container">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container">
						
							<div class="position-relative">
								<div id="login-box" class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											
											<h2 class="header blue lighter bigger center">
												监控直播管理系统
												
											</h2>

											<div class="space-6"></div>
											<form action="/admin/login/doLogin" method="post" id="loginForm">
												<fieldset>
													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" class="form-control" id="username" name="username" placeholder="用户名" />
															<i class="icon-user"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control" id="password"  name="password" placeholder="密码" />
															<i class="icon-lock"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="text" name="code" class="form-control" id="code" placeholder="验证吗" style="width:200px;float:left;" />
														<img id="verify_img" src="/admin/login/code" title="看不清？点击刷新" onclick="javascript:this.src='{{__ROOT__}}/admin/login/code?mt='+Math.random()" />
														</span>
													</label>

													<div class="space"></div>

													<div class="center">
														
														<button type="sub" class="width-80 btn btn-primary">
															<i class="icon-key"></i>
															登录
														</button>
													</div>
													<div class="space-4"></div>
												</fieldset>
											</form>

											
											
										</div><!-- /widget-main -->

										
									</div><!-- /widget-body -->
								</div><!-- /login-box -->
							
							</div><!-- /position-relative -->
						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div>
		</div><!-- /.main-container -->

		<script>
		
			$(function(){
				
				

				$('#loginForm').submit(function(){
					var username=$("#username").val();
					var password=$("#password").val();					
					var code=$("#code").val();

					if(username==''){
						alert('用户名不能为空');
						return false;
					}
					if(password==''){
						alert('密码不能为空');
						return false;
					}
					if(password.length<6){
						alert('密码长度不能小于6位');
						return false;
					}

					if(code.length<4){
						alert('验证码长度不合法');
						return false;
					}

				})

				
			})		
		</script>	
</body>
</html>
